package com.ethink.warehouse.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.SubWarehouseInfo;
import com.ethink.warehouse.api.request.SubWarehouseQueryRequest;
import com.ethink.warehouse.common.entity.SubWarehouse;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 仓库分仓 Mapper接口
 *
 * @author default
 * @date 2022-11-01
 */
@Mapper
public interface SubWarehouseMapper extends BaseMapper<SubWarehouse> {

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<SubWarehouseInfo> querySubWarehouse(Page buildPage, @Param("request") SubWarehouseQueryRequest request);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    SubWarehouseInfo getSubWarehouseById(@Param("id") Long id);

    /**
     * 列表查询
     *
     * @return
     */
    List<SubWarehouseInfo> listSubWarehouse();

    /**
     * 列表查询
     *
     * @return
     */
    List<SubWarehouseInfo> listSubWarehouseByCodeList(@Param("codeList") List<String> codeList);

    SubWarehouseInfo getSubWarehouseByCode(@Param("subWarehouseCode") String subWarehouseCode);
}